﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ProjectCommon
{
    public partial class FrmInputBox : Form
    {
        public FrmInputBox(string FromCaption,string LabelHint)
        {
            InitializeComponent();
            this.Text = FromCaption;
            lblHint.Text = LabelHint;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
        }

        private void tbInput_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == 13)
            {
                btnOK.PerformClick();
            }
        }
    }
}
